package formbeans;

import java.util.ArrayList;
import java.util.List;

import org.mybeans.form.FormBean;

public class BasicNameForm extends FormBean {

	private String name;
	
	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = trimAndConvert(name,"<>\"");
	}
	
	public List<String> checkBasicNameFormErrors(){
		List<String> errors = new ArrayList<String>();
		
		if(name == null || name.length() == 0){
			errors.add("Please enter a name");
		}
		
		return errors;
	}
}